package com.bjc.nio.multithreading;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @program: nettypro
 * @description:
 * @author: bjc
 * @create: 2021-09-17 22:24
 */
public class TestClient {

    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost",8081));
        sc.write(Charset.defaultCharset().encode("123456789abcdef"));
        System.in.read();
    }
}
